{if condition='$pager->totalPages > 1'}
<div class="none color-9e-text mb20" id="unifiedOnclick" onclick="unifiedajaxAppendList(this);" data-url="{$requestUrl}" data-page='2'>加载更多...</div>
<div class="none color-9e-text mb20" id="unifiedNullShow">没有更多数据了...</div>
<script type="text/javascript">
    // 触底加载
    var minAwayBtm = 1;
    $(window).scroll(function () {
        var awayBtm = $(document).height() - $(window).scrollTop() - $(window).height();
        if (awayBtm <= minAwayBtm) {
            if (document.getElementById('unifiedOnclick')) $('#unifiedOnclick').click();
        }
    });

    // ajax加载下一页数据
    function unifiedajaxAppendList(obj) {
        var pages = $(obj).attr('data-page');
        if (parseInt(pages) >= 2) {
            // layerLoading('正在加载');
            $.ajax({
                url : $(obj).data('url'),
                data: {
                    _ajax: 1,
                    p: pages,
                },
                type: 'post',
                dataType: 'json',
                success: function(res) {
                    layer.closeAll();
                    if (false === res) {
                        $(obj).hide();
                        if (document.getElementById('unifiedNullShow')) $('#unifiedNullShow').css('text-align', 'center').show();
                    } else {
                        $(obj).attr('data-page', ++pages);
                        if (document.getElementById('unifiedAjaxAppendList')) $('#unifiedAjaxAppendList').append(res);
                    }
                }
            });
        }
    }
</script>
{/if}